Skip to content

LKSM: Multivalue text choice automation: Assays#7511

Open
DariaBod wants to merge 4 commits intodevelopfrom
fb_mvtc_assay
Open

LKSM: Multivalue text choice automation: Assays#7511
DariaBod wants to merge 4 commits intodevelopfrom
fb_mvtc_assay

Conversation

@DariaBod
Copy link
Contributor

@DariaBod DariaBod commented Mar 20, 2026

Rationale

Test Multiple files import for Assays in Labkey Server with MVTC.

Related Pull Requests

Comment on lines +67 to +69
import static org.labkey.test.util.samplemanagement.SMTestUtils.COL_ASSAY_ID_LABEL;
import static org.labkey.test.util.samplemanagement.SMTestUtils.COL_MULTITEXTCHOICE;
import static org.labkey.test.util.samplemanagement.SMTestUtils.TEXT_MULTI_CHOICE_LIST;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there is a matching dependency between the modules themselves, tests for one module shouldn't import anything from tests for another module.
Referring to code in a private repository from code in a public repository is especially unwanted. The community suites can't run with this sort of import present.

This test should just define its own multi-text choice column.

Comment on lines +132 to +138
ReactAssayDesignerPage assayDesignerPage = _assayHelper.createAssayDesign("General", MVTC_MULTI_FILE_IMPORT_ASSAY);

assayDesignerPage.goToResultsFields()
.removeAllFields(false)
.addField(COL_MULTITEXTCHOICE.getFieldDefinition());

assayDesignerPage.clickFinish();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create this assay via API.

.containsExactlyInAnyOrderElementsOf(expectedValues));
}

private String buildFileContent(List<List<String>> fileData)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method's functionality is much more specialized than the method name implies. The name should reflect the specific purpose of this method. Also, it should just return the file since that's how this is always used.

Suggested change
private String buildFileContent(List<List<String>> fileData)
private File writeMultiValueTextForAssayRun(List<List<String>> multiValueSelections)

List<String> expectedValues = Stream.concat(fileDataFirstImport.stream(), fileDataSecondImport.stream())
.map(values -> TestArrayDataUtils.sortAndJoin(values, " "))
.toList();
checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE.getLabel()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use column labels as a last resort.

Suggested change
checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE.getLabel()))
checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants